//    Copyright (C) Kherty.  All rights reserved.

using System;

namespace OpenLS.Spreadsheet.Extensibility
{
    abstract class IgnoreAttributeObsolete: ParameterConverterAttribute
    {
        protected IgnoreAttributeObsolete(ReferenceOption argumentOrReference): base (argumentOrReference)
        {
        }

        protected IgnoreAttributeObsolete()
        {
        }
        internal   void ConvertImp<T>(ConversionData data)
        {

            data.Ignore = data.Value is T;
            if (!data.Ignore)
            {
                ICell cell = data.Value as ICell;
                if (cell != null)
                    data.Ignore = cell.Value is T;
            }
        }
        

    }
    public class IgnoreBooleansAttribute : ParameterConverterAttribute
    {
        public IgnoreBooleansAttribute()
        {

        }
        public IgnoreBooleansAttribute(ReferenceOption refMode)
            : base(refMode)
        {
        }

        internal override void ConvertImp(ConversionData data)
        {
            data.Ignore = data.Value is bool;
        }
    }
}